const bigScreen = {
  namespaced: true,
  state: {
    shipInfo: {
      shipId: null,
      flag: false,
      t: null
    },
    collapse1: true,
    collapse2: false,
  },

  mutations: {
    SET_SHIP_INFO: (state, data) => {
      data.t = new Date().getTime()
      state.shipInfo = data
    },
    SET_COLLAPSE1: (state, data) => {
      state.collapse1 = data
    },
    SET_COLLAPSE2: (state, data) => {
      state.collapse2 = data
    }
  },

  actions: {
    setShipInfo({commit}, data) {
      commit('SET_SHIP_INFO', data)
    },
    setCollapse1({commit}, data) {
      commit('SET_COLLAPSE1', data)
    },
    setCollapse2({commit}, data) {
      commit('SET_COLLAPSE2', data)
    }
  }
}

export default bigScreen
